<?php

namespace app\service\order;

class OrderOper
{

    /**
     * 订单取消
     * @author mitu
     * @date   2023-11-09
     * @param  [type]     $order [description]
     * @param  [type]     $user  [description]
     * @param  string     $type  [description]
     * @param  string     $msg   [description]
     * @return [type]            [description]
     */
    public function cancel($order, $user = null, $type = 'user', $msg = '') 
    {
        switch ($order['order_type']) {
            case 30:
                $order->status = -1;
                $order->save();
                $row = \app\admin\model\order\Recharge::where('order_id',$order->id)->find();
                $row->status = -1;
                $row->save();
                break;
        }
        return $order;
    }

}
